const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    headers: { 'Access-Control-Allow-Origin': '*' },
    proxy: {
      "/": {
        // target:"http://localhost:80",
        target: "https://www.kaoyanzhengzhi.top",
        changeOrgin: true,
        onProxyReq: (proxyReq, req, res) => {
          if (req.method === 'POST' && req.body) {
            const contentLength = Buffer.byteLength(req.body, 'utf-8');

            proxyReq.setHeader('Content-Length', contentLength);
          }
        },
      },
      ws:false
    },

    client: {
      overlay: false
    }
  }
})
